<?php
	include "sql.php";
	if(is_array($_POST)&&count($_POST)==2){
		$parkingName = $data = "";
		if($_SERVER["REQUEST_METHOD"] == "POST"){
			$parkingName = $_POST["parkingName"];
			$data = $_POST["data"];
			if($parkingName!=null && $parkingName!="" && $data!=""){
				$res = explode('###',$data);
				foreach ($res as $row) {
					$row = explode("#",$row);
					if( count($row)!=8) continue;
					setData($parkingName,$row);
				}
			}
			return;
		}
	}	
?>